import { Response, ResponseSignInDto } from '@/types/apiType';

import request from '../utils/request';
import { RequestConfig } from '../utils/request/type';

/**
 * @description
 * @tags 签到接口
 * @summary 签到
 * @request post:/api/signIn
 */
export const apiSignInByPost = (config?: RequestConfig) =>
  request.post<Response>(`/api/signIn`, {}, config).then((res) => res?.result);

/**
 * @description
 * @tags 签到接口
 * @summary 签到查询
 * @request get:/api/signIn/query
 */
export const apiSignInQueryByGet = (params: { activityId: number }, config?: RequestConfig) =>
  request.get<ResponseSignInDto>(`/api/signIn/query`, params, config).then((res) => res?.result);
